﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;

public partial class chitietsanpham : System.Web.UI.Page
{
    private SqlConnection cnn;
    private SqlCommand cmd;
    private String strSQL, strcnntring;
    private SqlDataAdapter daChitietsanpham;
    private DataSet dsChitietsanpham;
    protected void Page_Load(object sender, EventArgs e)
    {
        strcnntring = ConfigurationManager.ConnectionStrings["CSDL"].ConnectionString;
        int P_ID = int.Parse(Request.QueryString["P_ID"].ToString());
        cnn = new SqlConnection(strcnntring);
        strSQL = "select * from PRODUCT where P_ID=" + P_ID;
        daChitietsanpham = new SqlDataAdapter(strSQL, cnn);
        dsChitietsanpham = new DataSet();
        daChitietsanpham.Fill(dsChitietsanpham, "PRODUCT");
        fvChitiet.DataSource = dsChitietsanpham;
        fvChitiet.DataBind();
    }
}